package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是cdt_group_device_day_divide_cnt_demo的数据传输对象基类,直接与表对应<br>
 */
public abstract class GroupDeviceDayDivideCntDemoModelBase
		implements Serializable, Comparable<GroupDeviceDayDivideCntDemoModelBase> {

	private static final long serialVersionUID = 1L;

	/**
	 * 属性:id<br>
	 */
	private Integer id = 0;
	/**
	 * 属性:设备号<br>
	 * 含义:设备号<br>
	 */
	private String terminal = "";
	/**
	 * 属性:名称<br>
	 * 含义:名称<br>
	 */
	private String name = "";
	/**
	 * 属性:地址<br>
	 * 含义:地址<br>
	 */
	private String address = "";
	/**
	 * 属性:租借人数<br>
	 * 含义:租借人数<br>
	 */
	private Integer borrowUserSum = 0;
	/**
	 * 属性:租借充电宝数<br>
	 * 含义:租借充电宝数<br>
	 */
	private Integer borrowCDBSum = 0;
	/**
	 * 属性:新增用户数<br>
	 * 含义:新增用户数<br>
	 */
	private Integer newUserSum = 0;
	/**
	 * 属性:租金收入<br>
	 * 含义:租金收入<br>
	 */
	private Double borrowRentSum = 0.0;
	/**
	 * 属性:售线收入<br>
	 * 含义:售线收入<br>
	 */
	private Double sellLineMoneySum = 0.0;
	/**
	 * 属性:添加时间<br>
	 * 含义:添加时间<br>
	 */
	private Date addTime = new Date();
	/**
	 * 属性:更新时间<br>
	 * 含义:更新时间<br>
	 */
	private Date updateTime = new Date();
	/**
	 * 属性:排序时间戳<br>
	 * 含义:排序时间戳<br>
	 */
	private Long sortTime = null;
	/**
	 * 属性:售卖充电宝收入<br>
	 * 含义:售卖充电宝收入<br>
	 */
	private Double sellCDBSum = 0.0;
	/**
	 * 属性:售卖充电宝数量<br>
	 * 含义:售卖充电宝数量<br>
	 */
	private Integer sellCDBNum = 0;
	/**
	 * 属性:售线总数<br>
	 * 含义:售线总数<br>
	 */
	private Integer sellLineNum = 0;
	/**
	 * 属性:赠送线数量<br>
	 * 含义:赠送线数量<br>
	 */
	private Integer presentLineNum = 0;
	/**
	 * 属性:集团Id<br>
	 * 含义:集团Id<br>
	 */
	private Integer groupUserId = 0;
	/**
	 * 属性:归属集团Id<br>
	 * 含义:归属集团Id<br>
	 */
	private Integer higherUpGroupUserId = 0;
	/**
	 * 属性:分成后剩余租金收入<br>
	 * 含义:分成后剩余租金收入<br>
	 */
	private Double residueBorrowRentSum = 0.0;
	/**
	 * 属性:分成后剩余售线收入<br>
	 * 含义:分成后剩余售线收入<br>
	 */
	private Double residueSellLineMoneySum = 0.0;
	/**
	 * 属性:分成后售卖充电宝数量<br>
	 * 含义:分成后售卖充电宝数量<br>
	 */
	private Double residueSellCDBSum = 0.0;
	/**
	 * 属性:等级<br>
	 * 含义:等级<br>
	 */
	private Integer level = 0;
	/**
	 * 属性:购买充电宝之后归还的数量<br>
	 * 含义:购买充电宝之后归还的数量<br>
	 */
	private Integer buyCDBGiveBackCnt = 0;
	/**
	 * 属性:购买充电宝之后归还的盈利<br>
	 * 含义:购买充电宝之后归还的盈利<br>
	 */
	private Double buyCDBGiveBackMoney = 0.0;
	/**
	 * 属性:分成后购买充电宝之后归还的盈利<br>
	 * 含义:分成后购买充电宝之后归还的盈利<br>
	 */
	private Double residueBuyCDBGiveBackMoney = 0.0;

	/**
	 * 默认构造方法,构造一个默认的GroupDeviceDayDivideCntDemoModelBase对象
	 */
	public GroupDeviceDayDivideCntDemoModelBase() {
	}

	/**
	 * 构造函数
	 * 
	 * @param rs
	 *            数据库查询结果集
	 */
	public GroupDeviceDayDivideCntDemoModelBase(ResultSet rs) {
		try {
			this.id = rs.getInt("id");
			this.terminal = rs.getString("terminal");
			this.name = rs.getString("name");
			this.address = rs.getString("address");
			this.borrowUserSum = rs.getInt("borrowUserSum");
			this.borrowCDBSum = rs.getInt("borrowCDBSum");
			this.newUserSum = rs.getInt("newUserSum");
			this.borrowRentSum = rs.getDouble("borrowRentSum");
			this.sellLineMoneySum = rs.getDouble("sellLineMoneySum");
			this.addTime = rs.getDate("addTime");
			this.updateTime = rs.getDate("updateTime");
			this.sortTime = rs.getLong("sortTime");
			this.sellCDBSum = rs.getDouble("sellCDBSum");
			this.sellCDBNum = rs.getInt("sellCDBNum");
			this.sellLineNum = rs.getInt("sellLineNum");
			this.presentLineNum = rs.getInt("presentLineNum");
			this.groupUserId = rs.getInt("groupUserId");
			this.higherUpGroupUserId = rs.getInt("higherUpGroupUserId");
			this.residueBorrowRentSum = rs.getDouble("residueBorrowRentSum");
			this.residueSellLineMoneySum = rs.getDouble("residueSellLineMoneySum");
			this.residueSellCDBSum = rs.getDouble("residueSellCDBSum");
			this.level = rs.getInt("level");
			this.buyCDBGiveBackCnt = rs.getInt("buyCDBGiveBackCnt");
			this.buyCDBGiveBackMoney = rs.getDouble("buyCDBGiveBackMoney");
			this.residueBuyCDBGiveBackMoney = rs.getDouble("residueBuyCDBGiveBackMoney");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * 设置属性id<br>
	 * 
	 * @param id
	 *            待设置的属性id的值
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * 获取属性id<br>
	 * 
	 * @return 属性id的值
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * 设置属性设备号<br>
	 * 含义:设备号<br>
	 * 
	 * @param terminal
	 *            待设置的属性设备号的值
	 */
	public void setTerminal(String terminal) {
		this.terminal = terminal;
	}

	/**
	 * 获取属性设备号<br>
	 * 含义:设备号<br>
	 * 
	 * @return 属性设备号的值
	 */
	public String getTerminal() {
		return terminal;
	}

	/**
	 * 设置属性名称<br>
	 * 含义:名称<br>
	 * 
	 * @param name
	 *            待设置的属性名称的值
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * 获取属性名称<br>
	 * 含义:名称<br>
	 * 
	 * @return 属性名称的值
	 */
	public String getName() {
		return name;
	}

	/**
	 * 设置属性地址<br>
	 * 含义:地址<br>
	 * 
	 * @param address
	 *            待设置的属性地址的值
	 */
	public void setAddress(String address) {
		this.address = address;
	}

	/**
	 * 获取属性地址<br>
	 * 含义:地址<br>
	 * 
	 * @return 属性地址的值
	 */
	public String getAddress() {
		return address;
	}

	/**
	 * 设置属性租借人数<br>
	 * 含义:租借人数<br>
	 * 
	 * @param borrowUserSum
	 *            待设置的属性租借人数的值
	 */
	public void setBorrowUserSum(Integer borrowUserSum) {
		this.borrowUserSum = borrowUserSum;
	}

	/**
	 * 获取属性租借人数<br>
	 * 含义:租借人数<br>
	 * 
	 * @return 属性租借人数的值
	 */
	public Integer getBorrowUserSum() {
		return borrowUserSum;
	}

	/**
	 * 设置属性租借充电宝数<br>
	 * 含义:租借充电宝数<br>
	 * 
	 * @param borrowCDBSum
	 *            待设置的属性租借充电宝数的值
	 */
	public void setBorrowCDBSum(Integer borrowCDBSum) {
		this.borrowCDBSum = borrowCDBSum;
	}

	/**
	 * 获取属性租借充电宝数<br>
	 * 含义:租借充电宝数<br>
	 * 
	 * @return 属性租借充电宝数的值
	 */
	public Integer getBorrowCDBSum() {
		return borrowCDBSum;
	}

	/**
	 * 设置属性新增用户数<br>
	 * 含义:新增用户数<br>
	 * 
	 * @param newUserSum
	 *            待设置的属性新增用户数的值
	 */
	public void setNewUserSum(Integer newUserSum) {
		this.newUserSum = newUserSum;
	}

	/**
	 * 获取属性新增用户数<br>
	 * 含义:新增用户数<br>
	 * 
	 * @return 属性新增用户数的值
	 */
	public Integer getNewUserSum() {
		return newUserSum;
	}

	/**
	 * 设置属性租金收入<br>
	 * 含义:租金收入<br>
	 * 
	 * @param borrowRentSum
	 *            待设置的属性租金收入的值
	 */
	public void setBorrowRentSum(Double borrowRentSum) {
		this.borrowRentSum = borrowRentSum;
	}

	/**
	 * 获取属性租金收入<br>
	 * 含义:租金收入<br>
	 * 
	 * @return 属性租金收入的值
	 */
	public Double getBorrowRentSum() {
		return borrowRentSum;
	}

	/**
	 * 设置属性售线收入<br>
	 * 含义:售线收入<br>
	 * 
	 * @param sellLineMoneySum
	 *            待设置的属性售线收入的值
	 */
	public void setSellLineMoneySum(Double sellLineMoneySum) {
		this.sellLineMoneySum = sellLineMoneySum;
	}

	/**
	 * 获取属性售线收入<br>
	 * 含义:售线收入<br>
	 * 
	 * @return 属性售线收入的值
	 */
	public Double getSellLineMoneySum() {
		return sellLineMoneySum;
	}

	/**
	 * 设置属性添加时间<br>
	 * 含义:添加时间<br>
	 * 
	 * @param addTime
	 *            待设置的属性添加时间的值
	 */
	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	/**
	 * 获取属性添加时间<br>
	 * 含义:添加时间<br>
	 * 
	 * @return 属性添加时间的值
	 */
	public Date getAddTime() {
		return addTime;
	}

	/**
	 * 设置属性更新时间<br>
	 * 含义:更新时间<br>
	 * 
	 * @param updateTime
	 *            待设置的属性更新时间的值
	 */
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	/**
	 * 获取属性更新时间<br>
	 * 含义:更新时间<br>
	 * 
	 * @return 属性更新时间的值
	 */
	public Date getUpdateTime() {
		return updateTime;
	}

	/**
	 * 设置属性排序时间戳<br>
	 * 含义:排序时间戳<br>
	 * 
	 * @param sortTime
	 *            待设置的属性排序时间戳的值
	 */
	public void setSortTime(Long sortTime) {
		this.sortTime = sortTime;
	}

	/**
	 * 获取属性排序时间戳<br>
	 * 含义:排序时间戳<br>
	 * 
	 * @return 属性排序时间戳的值
	 */
	public Long getSortTime() {
		return sortTime;
	}

	/**
	 * 设置属性售卖充电宝收入<br>
	 * 含义:售卖充电宝收入<br>
	 * 
	 * @param sellCDBSum
	 *            待设置的属性售卖充电宝收入的值
	 */
	public void setSellCDBSum(Double sellCDBSum) {
		this.sellCDBSum = sellCDBSum;
	}

	/**
	 * 获取属性售卖充电宝收入<br>
	 * 含义:售卖充电宝收入<br>
	 * 
	 * @return 属性售卖充电宝收入的值
	 */
	public Double getSellCDBSum() {
		return sellCDBSum;
	}

	/**
	 * 设置属性售卖充电宝数量<br>
	 * 含义:售卖充电宝数量<br>
	 * 
	 * @param sellCDBNum
	 *            待设置的属性售卖充电宝数量的值
	 */
	public void setSellCDBNum(Integer sellCDBNum) {
		this.sellCDBNum = sellCDBNum;
	}

	/**
	 * 获取属性售卖充电宝数量<br>
	 * 含义:售卖充电宝数量<br>
	 * 
	 * @return 属性售卖充电宝数量的值
	 */
	public Integer getSellCDBNum() {
		return sellCDBNum;
	}

	/**
	 * 设置属性售线总数<br>
	 * 含义:售线总数<br>
	 * 
	 * @param sellLineNum
	 *            待设置的属性售线总数的值
	 */
	public void setSellLineNum(Integer sellLineNum) {
		this.sellLineNum = sellLineNum;
	}

	/**
	 * 获取属性售线总数<br>
	 * 含义:售线总数<br>
	 * 
	 * @return 属性售线总数的值
	 */
	public Integer getSellLineNum() {
		return sellLineNum;
	}

	/**
	 * 设置属性赠送线数量<br>
	 * 含义:赠送线数量<br>
	 * 
	 * @param presentLineNum
	 *            待设置的属性赠送线数量的值
	 */
	public void setPresentLineNum(Integer presentLineNum) {
		this.presentLineNum = presentLineNum;
	}

	/**
	 * 获取属性赠送线数量<br>
	 * 含义:赠送线数量<br>
	 * 
	 * @return 属性赠送线数量的值
	 */
	public Integer getPresentLineNum() {
		return presentLineNum;
	}

	/**
	 * 设置属性集团Id<br>
	 * 含义:集团Id<br>
	 * 
	 * @param groupUserId
	 *            待设置的属性集团Id的值
	 */
	public void setGroupUserId(Integer groupUserId) {
		this.groupUserId = groupUserId;
	}

	/**
	 * 获取属性集团Id<br>
	 * 含义:集团Id<br>
	 * 
	 * @return 属性集团Id的值
	 */
	public Integer getGroupUserId() {
		return groupUserId;
	}

	/**
	 * 设置属性归属集团Id<br>
	 * 含义:归属集团Id<br>
	 * 
	 * @param higherUpGroupUserId
	 *            待设置的属性归属集团Id的值
	 */
	public void setHigherUpGroupUserId(Integer higherUpGroupUserId) {
		this.higherUpGroupUserId = higherUpGroupUserId;
	}

	/**
	 * 获取属性归属集团Id<br>
	 * 含义:归属集团Id<br>
	 * 
	 * @return 属性归属集团Id的值
	 */
	public Integer getHigherUpGroupUserId() {
		return higherUpGroupUserId;
	}

	/**
	 * 设置属性分成后剩余租金收入<br>
	 * 含义:分成后剩余租金收入<br>
	 * 
	 * @param residueBorrowRentSum
	 *            待设置的属性分成后剩余租金收入的值
	 */
	public void setResidueBorrowRentSum(Double residueBorrowRentSum) {
		this.residueBorrowRentSum = residueBorrowRentSum;
	}

	/**
	 * 获取属性分成后剩余租金收入<br>
	 * 含义:分成后剩余租金收入<br>
	 * 
	 * @return 属性分成后剩余租金收入的值
	 */
	public Double getResidueBorrowRentSum() {
		return residueBorrowRentSum;
	}

	/**
	 * 设置属性分成后剩余售线收入<br>
	 * 含义:分成后剩余售线收入<br>
	 * 
	 * @param residueSellLineMoneySum
	 *            待设置的属性分成后剩余售线收入的值
	 */
	public void setResidueSellLineMoneySum(Double residueSellLineMoneySum) {
		this.residueSellLineMoneySum = residueSellLineMoneySum;
	}

	/**
	 * 获取属性分成后剩余售线收入<br>
	 * 含义:分成后剩余售线收入<br>
	 * 
	 * @return 属性分成后剩余售线收入的值
	 */
	public Double getResidueSellLineMoneySum() {
		return residueSellLineMoneySum;
	}

	/**
	 * 设置属性分成后售卖充电宝数量<br>
	 * 含义:分成后售卖充电宝数量<br>
	 * 
	 * @param residueSellCDBSum
	 *            待设置的属性分成后售卖充电宝数量的值
	 */
	public void setResidueSellCDBSum(Double residueSellCDBSum) {
		this.residueSellCDBSum = residueSellCDBSum;
	}

	/**
	 * 获取属性分成后售卖充电宝数量<br>
	 * 含义:分成后售卖充电宝数量<br>
	 * 
	 * @return 属性分成后售卖充电宝数量的值
	 */
	public Double getResidueSellCDBSum() {
		return residueSellCDBSum;
	}

	/**
	 * 设置属性等级<br>
	 * 含义:等级<br>
	 * 
	 * @param level
	 *            待设置的属性等级的值
	 */
	public void setLevel(Integer level) {
		this.level = level;
	}

	/**
	 * 获取属性等级<br>
	 * 含义:等级<br>
	 * 
	 * @return 属性等级的值
	 */
	public Integer getLevel() {
		return level;
	}

	/**
	 * 设置属性购买充电宝之后归还的数量<br>
	 * 含义:购买充电宝之后归还的数量<br>
	 * 
	 * @param buyCDBGiveBackCnt
	 *            待设置的属性购买充电宝之后归还的数量的值
	 */
	public void setBuyCDBGiveBackCnt(Integer buyCDBGiveBackCnt) {
		this.buyCDBGiveBackCnt = buyCDBGiveBackCnt;
	}

	/**
	 * 获取属性购买充电宝之后归还的数量<br>
	 * 含义:购买充电宝之后归还的数量<br>
	 * 
	 * @return 属性购买充电宝之后归还的数量的值
	 */
	public Integer getBuyCDBGiveBackCnt() {
		return buyCDBGiveBackCnt;
	}

	/**
	 * 设置属性购买充电宝之后归还的盈利<br>
	 * 含义:购买充电宝之后归还的盈利<br>
	 * 
	 * @param buyCDBGiveBackMoney
	 *            待设置的属性购买充电宝之后归还的盈利的值
	 */
	public void setBuyCDBGiveBackMoney(Double buyCDBGiveBackMoney) {
		this.buyCDBGiveBackMoney = buyCDBGiveBackMoney;
	}

	/**
	 * 获取属性购买充电宝之后归还的盈利<br>
	 * 含义:购买充电宝之后归还的盈利<br>
	 * 
	 * @return 属性购买充电宝之后归还的盈利的值
	 */
	public Double getBuyCDBGiveBackMoney() {
		return buyCDBGiveBackMoney;
	}

	/**
	 * 设置属性分成后购买充电宝之后归还的盈利<br>
	 * 含义:分成后购买充电宝之后归还的盈利<br>
	 * 
	 * @param residueBuyCDBGiveBackMoney
	 *            待设置的属性分成后购买充电宝之后归还的盈利的值
	 */
	public void setResidueBuyCDBGiveBackMoney(Double residueBuyCDBGiveBackMoney) {
		this.residueBuyCDBGiveBackMoney = residueBuyCDBGiveBackMoney;
	}

	/**
	 * 获取属性分成后购买充电宝之后归还的盈利<br>
	 * 含义:分成后购买充电宝之后归还的盈利<br>
	 * 
	 * @return 属性分成后购买充电宝之后归还的盈利的值
	 */
	public Double getResidueBuyCDBGiveBackMoney() {
		return residueBuyCDBGiveBackMoney;
	}

	/**
	 * 比较两个对象在逻辑上是否相等
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof GroupDeviceDayDivideCntDemoModelBase)) {
			return false;
		}

		final GroupDeviceDayDivideCntDemoModelBase otherModel = (GroupDeviceDayDivideCntDemoModelBase) other;
		if (getId() != null && !getId().equals(otherModel.getId())) {
			return false;
		}
		return true;
	}

	/**
	 * 根据主键生成HashCode
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		StringBuffer buffer = new StringBuffer();
		buffer.append('|').append(id);
		return buffer.toString().hashCode();
	}

	/*
	 * 重写toString
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "GroupDeviceDayDivideCntDemoModelBase [id=" + id + ", terminal=" + terminal + ", name=" + name
				+ ", address=" + address + ", borrowUserSum=" + borrowUserSum + ", borrowCDBSum=" + borrowCDBSum
				+ ", newUserSum=" + newUserSum + ", borrowRentSum=" + borrowRentSum + ", sellLineMoneySum="
				+ sellLineMoneySum + ", addTime=" + addTime + ", updateTime=" + updateTime + ", sortTime=" + sortTime
				+ ", sellCDBSum=" + sellCDBSum + ", sellCDBNum=" + sellCDBNum + ", sellLineNum=" + sellLineNum
				+ ", presentLineNum=" + presentLineNum + ", groupUserId=" + groupUserId + ", higherUpGroupUserId="
				+ higherUpGroupUserId + ", residueBorrowRentSum=" + residueBorrowRentSum + ", residueSellLineMoneySum="
				+ residueSellLineMoneySum + ", residueSellCDBSum=" + residueSellCDBSum + ", level=" + level
				+ ", buyCDBGiveBackCnt=" + buyCDBGiveBackCnt + ", buyCDBGiveBackMoney=" + buyCDBGiveBackMoney
				+ ", residueBuyCDBGiveBackMoney=" + residueBuyCDBGiveBackMoney + "]";
	}

	@Override
	public int compareTo(GroupDeviceDayDivideCntDemoModelBase o) {
		// TODO Auto-generated method stub
		if (o.name.compareTo(this.name) > 0) {
			return 1;
		} else if (o.name.compareTo(this.name) < 0) {
			return -1;
		} else {
			return 0;
		}

	}

}
